// *Author：jxx
// *Contact：283591387@qq.com
// *代码由框架生成,任何更改都可能导致被代码生成器覆盖
export default function(){
    const table = {
        key: 'ProductMaterialListId',
        footer: "Foots",
        cnName: '生产用料清单',
        name: 'ProductMaterialList',
        newTabEdit: false,
        url: "/ProductMaterialList/",
        sortName: "ProductMaterialListId"
    };
    const tableName = table.name;
    const tableCNName = table.cnName;
    const newTabEdit = false;
    const key = table.key;
    const editFormFields = {"MaterialNo":"","MaterialName":"","Spec":"","MaterialTypeId":"","UnitId":"","IsBackflush":"","NextBomNo":"","IsCriticalParts":"","ProductProcessId":"","AttritionRate":"","DepartmentId":[],"FeedingQty":"","UseMaterialQty":""};
    const editFormOptions = [[{"title":"规格","field":"Spec","type":"text"},
                               {"title":"子Bom编码","field":"NextBomNo","type":"text"},
                               {"dataKey":"工序信息","data":[],"title":"所属工序","field":"ProductProcessId","type":"select"},
                               {"dataKey":"部门级联","data":[],"title":"部门","required":true,"field":"DepartmentId","type":"cascader"},
                               {"title":"上料数量","field":"FeedingQty","type":"decimal"},
                               {"title":"用料数量","field":"UseMaterialQty","type":"decimal"},
                               {"title":"物料编码","required":true,"field":"MaterialNo","type":"text"},
                               {"title":"物料名称","required":true,"field":"MaterialName","type":"text"},
                               {"dataKey":"物料属性","data":[],"title":"物料属性","required":true,"field":"MaterialTypeId","type":"select"},
                               {"dataKey":"计量单位","data":[],"title":"单位","required":true,"field":"UnitId","type":"select"},
                               {"dataKey":"是否","data":[],"title":"是否倒冲","required":true,"field":"IsBackflush","type":"select"},
                               {"dataKey":"是否","data":[],"title":"关键件","required":true,"field":"IsCriticalParts","type":"select"},
                               {"title":"损耗率","required":true,"field":"AttritionRate","type":"decimal"}]];
    const searchFormFields = {};
    const searchFormOptions = [];
    const columns = [{field:'ProductMaterialListId',title:'用料清单标识',type:'int',width:110,hidden:true,readonly:true,require:true,align:'left'},
                       {field:'ProductTaskId',title:'生产任务标识',type:'int',width:110,hidden:true,align:'left'},
                       {field:'MaterialId',title:'物料标识',type:'int',width:110,hidden:true,require:true,align:'left'},
                       {field:'MaterialNo',title:'物料编码',type:'string',width:120,require:true,align:'left'},
                       {field:'MaterialName',title:'物料名称',type:'string',width:120,require:true,align:'left'},
                       {field:'Spec',title:'规格',type:'string',width:120,align:'left'},
                       {field:'MaterialTypeId',title:'物料属性',type:'int',bind:{ key:'物料属性',data:[]},width:110,require:true,align:'left'},
                       {field:'UnitId',title:'单位',type:'int',bind:{ key:'计量单位',data:[]},width:110,require:true,align:'left'},
                       {field:'IsBackflush',title:'是否倒冲',type:'int',bind:{ key:'是否',data:[]},width:110,require:true,align:'left'},
                       {field:'NextBomId',title:'子Bom标识',type:'int',width:110,hidden:true,align:'left'},
                       {field:'NextBomNo',title:'子Bom编码',type:'string',width:120,align:'left'},
                       {field:'IsCriticalParts',title:'关键件',type:'int',bind:{ key:'是否',data:[]},width:110,require:true,align:'left'},
                       {field:'ProductProcessId',title:'所属工序',type:'int',bind:{ key:'工序信息',data:[]},width:110,align:'left'},
                       {field:'AttritionRate',title:'损耗率',type:'decimal',width:110,require:true,align:'left'},
                       {field:'DepartmentId',title:'部门',type:'guid',bind:{ key:'部门级联',data:[]},width:110,require:true,align:'left'},
                       {field:'FeedingQty',title:'上料数量',type:'decimal',width:110,align:'left'},
                       {field:'UseMaterialQty',title:'用料数量',type:'decimal',width:110,align:'left'},
                       {field:'UnitQty',title:'单位用量',type:'decimal',width:110,align:'left'}];
    const detail ={columns:[]};
    const details = [];

    return {
        table,
        key,
        tableName,
        tableCNName,
        newTabEdit,
        editFormFields,
        editFormOptions,
        searchFormFields,
        searchFormOptions,
        columns,
        detail,
        details
    };
}